A storage system typically comprises one or more storage devices into which information may be entered, and from which information may be obtained, as desired. The storage system includes a storage operating system that functionally organizes the system by, inter alia, invoking storage operations in support of a storage service implemented by the system. The storage system may be implemented in accordance with a variety of storage architectures including, but not limited to, a network-attached storage environment, a storage area network and a disk assembly directly attached to a client or host computer. Storage of information on the disk array is preferably implemented as one or more storage “volumes” of physical disks, defining an overall logical arrangement of disk space.
The storage operating system of the storage system may implement a high-level module, such as a file system, to logically organize the information stored on the disks as a hierarchical structure of directories, files and blocks. A known type of file system is a write-anywhere file system that does not overwrite data on disks. If a data block is retrieved (read) from disk into a memory of the storage system and “dirtied” (i.e., updated or modified) with new data, the data block is thereafter stored (written) to a new location on disk to optimize write performance. A write-anywhere file system may initially assume an optimal layout such that the data is substantially contiguously arranged on disks. The optimal disk layout results in efficient access operations, particularly for sequential read operations, directed to the disks. An example of a write-anywhere file system that is configured to operate on a storage system is the Write Anywhere File Layout (WAFL™) file system available from Network Appliance, Inc., Sunnyvale, Calif.
A storage system has a fixed amount of free space available to users. When all of the free space is consumed, additional writes fail even when the system is up and running, thereby causing user downtime. A write failure is always undesirable. NFS clients handle a failed write by returning an error. Where a hierarchical structure of blocks on the disks is exported to users as a named logical unit numbers (LUN), write failures are more catastrophic. For example, write failures may lead to corruption of application data or executables that are being stored on the LUN, host operating system crash, or file system corruption.
Existing systems do not attempt to utilize an automated mechanism to reclaim storage space prior to allowing a request (e.g., a write request) to fail.